package com.maxd.model;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Getter;
import lombok.NoArgsConstructor;
import lombok.Setter;
import lombok.ToString;
import lombok.experimental.SuperBuilder;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;
import javax.persistence.Table;
import java.io.Serializable;
import java.util.Date;

/**
 * 流水号记录表
 */
@Entity
@Getter
@Setter
@ToString
@SuperBuilder
@NoArgsConstructor
@DynamicInsert
@ApiModel("流水号记录表")
@Table(name = "sequence_info")
public class SequenceInfo implements Serializable {

    private static final long serialVersionUID = 1L;

    @Id
    @ApiModelProperty("场景编码")
    @Column(name = "scene", nullable = false)
    private String scene;

    @ApiModelProperty("当前值")
    @Column(name = "current_value", nullable = false)
    private Long currentValue;

    @ApiModelProperty("步长，每次更新的时候会重新设置")
    @Column(name = "step", nullable = false)
    private Long step;

    @ApiModelProperty("创建时间")
    @Column(name = "create_time", nullable = false)
    private Date createTime;

    @ApiModelProperty("更新时间")
    @Column(name = "update_time", nullable = false)
    private Date updateTime;

}
